package com.bgs.travelapp.order.service.impl;

import com.bgs.travelapp.order.entity.OrderStatusEntity;
import com.bgs.travelapp.order.mapper.OrderStatusMapper;
import com.bgs.travelapp.order.service.OrderStatusService;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;
import java.util.List;

@Service
public class OrderStatusServiceImpl implements OrderStatusService {
    @Resource
    OrderStatusMapper orderStatusMapper;
    /**
     * 查询全部订单状态
     * fyys 2022.8.17 14：33
     * @return
     */
    @Override
    public List<OrderStatusEntity> getOrderStatus() {
        Example example=new Example(OrderStatusEntity.class);
        example.createCriteria().andEqualTo("delFlag",0);
        List<OrderStatusEntity> orderStatusEntities = orderStatusMapper.selectByExample(example);
        return orderStatusEntities;
    }
}
